load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
    name = "vfs",
    srcs = [
        "clone.go",
        "dir_unix.go",
        "dir_windows.go",
        "disk_health.go",
        "disk_usage_unix.go",
        "disk_usage_windows.go",
        "errors_unix.go",
        "errors_windows.go",
        "fadvise_generic.go",
        "fadvise_linux.go",
        "file_lock_generic.go",
        "file_lock_unix.go",
        "file_lock_windows.go",
        "mem_fs.go",
        "preallocate_generic.go",
        "preallocate_linux.go",
        "prefetch_generic.go",
        "prefetch_linux.go",
        "syncing_file.go",
        "syncing_file_generic.go",
        "syncing_file_linux.go",
        "vfs.go",
    ],
    importmap = "github.com/cockroachdb/cockroach/vendor/github.com/cockroachdb/pebble/vfs",
    importpath = "github.com/cockroachdb/pebble/vfs",
    visibility = ["//visibility:public"],
    deps = [
        "//vendor/github.com/cockroachdb/errors",
        "//vendor/github.com/cockroachdb/errors/oserror",
        "//vendor/github.com/cockroachdb/pebble/internal/invariants",
    ] + select({
        "@io_bazel_rules_go//go/platform:android": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:darwin": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:dragonfly": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:freebsd": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:ios": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:linux": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:openbsd": [
            "//vendor/golang.org/x/sys/unix",
        ],
        "@io_bazel_rules_go//go/platform:windows": [
            "//vendor/golang.org/x/sys/windows",
        ],
        "//conditions:default": [],
    }),
)
